using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace Gko.Utils
{
	[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Utils")]
	public static class AttributeUtils
	{
		[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")]
		public static IEnumerable<TAttribute> GetAttributes<TAttribute>(MemberInfo info, bool inherit) where TAttribute : Attribute
		{
			return info.GetCustomAttributes(typeof(TAttribute), inherit).Cast<TAttribute>();
		}
	}
}